function show_iframe(url,ww,wh){
	if($("#new_window_size").length>0){}else{
		$("body").append('<div id="new_window_size"></div>');
	}
	$("#new_window_size").html('<iframe src="'+url+'"></iframe>');
	$("#new_window_size iframe").load(function(){
		if(!ww) ww = $("#new_window_size iframe").contents().width();
		if(!wh) wh = $("#new_window_size iframe").contents().height();
		var wstr = '<div id="new_window" style="top:'+($(window).height()/2-wh/2)+'px;left:'+($(window).width()/2-ww/2)+'px;width:'+ww+'px;height:'+(wh+30)+'px;"><div class="title"><div class="close" onclick="$(this).parent().parent().remove();">close</div></div><iframe src="'+url+'" width="100%" height="100%" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></div>';
		$("body").append(wstr);
	}); 
}
function savedata(){
	if(submit_verify()==false) return false;
	$("form").submit();
}
function submit_verify(){
	var top = 0;
	var verifyTag = ['input','textarea','select'];
	for(var i=0;i<verifyTag.length;i++){
		if(top==1) break;
		var verifyObj = $(verifyTag[i]);
		for(var n=0;n<verifyObj.length;n++){
			if(top==1) break;
			var fun = verifyObj.eq(n).attr('autoverify');
			if(fun){
				var funArr = fun.split(",");
				for(var m=0;m<funArr.length;m++){
					if(top==1) break;
					if(funArr[m].indexOf(":")>0){
						var par = funArr[m].split(":");
					}else{
						var par = [funArr[m]];
					}
					if (typeof(eval(par[0])) == "function") {
						var funstr = par[0]+'(verifyObj.eq(n)';
						for(var x=1;x<par.length;x++){
							funstr = funstr + ",'"+par[x]+"'";
						}
						funstr = funstr + ')';
						if(eval(funstr)==false){
							top = 1;
							return false;
						}
					}
				}

			}
		}
	}
}
function not_null(obj,msg){
	var val = $(obj).val().replace(/(^\s*)|(\s*$)/g, "");
	if(val==''){
		alert(msg+' is null');
		$(obj).focus();
		return false;
	}
}